<?php 
class Zend_View_Helper_UrlParameters extends Zend_View_Helper_Abstract
{
    public function urlParameters($page)
    {
        $front = Zend_Controller_Front::getInstance();
        $request = $front->getRequest();
        
        $params = $request->getParams();
       
        if(empty($params['query'])) {
        	return $page;
        }
        $data = $page . "?query=".$params['query'];
         
        return $data;
    }
}